<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="../../../common/taglib.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<sfa:mainTitle></sfa:mainTitle>
		<%@ include file="../../../common/meta.jsp"%>
		<script type="text/javascript">
function DingYue(obj1, obj2, obj4, obj3) {
	var path = "${path}/users/mess/index/editmess?baseid=" + obj1
			+ "&subscribe=" + obj2 + "&type=" + obj4;
	art.dialog( {
		lock : true,
		content : '你确定要'+obj3+'吗?',
		ok : function() {
			art.dialog( {
				id : "loading",
				lock : true,
				drag : false,
				resize : false,
				title : "正在更改...",
				time : 5
			});
			$.post(path, null, function(result) {
				//alert(result);
					art.dialog( {
						id : 'loading'
					}).close();//关闭等待框
					if (result == 'TRUE') {
						art.dialog( {
							icon : "succeed",
							content : obj3 + "成功!",
							lock : true,
							ok : function() {
								location.reload();
							}
						});
					} else {
						art.dialog( {
							icon : "error",
							content : obj3 + "失败!",
							lock : true,
							ok : true
						});
					}

				});

			return true;
		},
		cancelVal : '关闭',
		cancel : true
	//为true等价于function(){}
		});
}
</script>
	</head>
	<body id="master">
		<form action="" name="form1" method="post">
			<sfa:mainHeader></sfa:mainHeader>

			<!--右边-->
			<div class="webpart3 contentarea">
				<div class="webpart-head">
					<div class="webpart-head-item">
						订阅中心

					</div>
				</div>
				<div class="webpart-main">
					<div class="webpart-main-item" style="padding-top: 12px;">
						<table width="100%" border="0" cellspacing="0" cellpadding="0"
							class="table_list" style="border: 1px solid #BAB9B9;">
							<tbody>
								<c:forEach items="${pagination.resultList}" var="list">
									<tr style="border-bottom: 1px solid #BAB9B9;">
										<td>
											<table width="100%" border="0" cellspacing="0"
												cellpadding="0">
												<tr>
													<td rowspan="4"
														style="text-align: center; width: 80px; height: 80px;">
														<img alt=""
															src="../../../images/MessageIcon/${list.MESSAGEPICTUREURL}">
													</td>
												</tr>
												<tr>
													<td style="border-bottom: 1px solid #BAB9B9;">
														${list.MESSAGENAME}
													</td>
												</tr>
												<tr>
													<td style="border-bottom: 1px solid #BAB9B9;">
														${list.MESSAGETITLE}
													</td>
												</tr>
												<tr>
													<td>
														<c:choose>
															<c:when test="${list.ISTURE=='0'}">
																<input type="button" class="linkbtn2"
																	onclick="DingYue('${list.SALEMESSAGEBASEID}','Y','mail','订阅',this)"
																	name="A_${list.SALEMESSAGEBASEID}"
																	id="A_${list.SALEMESSAGEBASEID}" value="邮件订阅" />
															</c:when>
															<c:when test="${list.ISTURE=='1'}">
																<input type="button" class="linkbtn2"
																	onclick="DingYue('${list.SALEMESSAGEBASEID}','N','mail','取消订阅',this)"
																	name="B_${list.SALEMESSAGEBASEID}"
																	id="B_${list.SALEMESSAGEBASEID}" value="取消邮件订阅" />
															</c:when>
														</c:choose>
														<!--<c:choose>
															<c:when test="${list.ISSUBSCRIPTION=='0'}">
																<input type="button" class="linkbtn2"
																	onclick="DingYue('${list.SALEMESSAGEBASEID}','Y','smsmessage','订阅',this)"
																	name="A_${list.SALEMESSAGEBASEID}"
																	id="A_${list.SALEMESSAGEBASEID}" value="短信订阅" />
															</c:when>
															<c:when test="${list.ISSUBSCRIPTION=='1'}">
																<input type="button" class="linkbtn2"
																	onclick="DingYue('${list.SALEMESSAGEBASEID}','N','smsmessage','取消订阅',this)"
																	name="B_${list.SALEMESSAGEBASEID}"
																	id="B_${list.SALEMESSAGEBASEID}" value="取消订阅" />
															</c:when>
														</c:choose>
													--></td>
												</tr>
												</tr>
											</table>
										</td>

										<td width="50%">

											模版
											<br>
											${list.masterplate}
										</td>

									</tr>
								</c:forEach>
							</tbody>
						</table>

					</div>
				</div>

				<div class="webpart-foot">
					<div class="webpart-foot-item">
					</div>
				</div>
			</div>



		</form>



		<sfa:mainFooter></sfa:mainFooter>
	</body>
</html>